package com.gxa.security.controller;

import com.gxa.common.base.RespResult;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
@RequestMapping("/test")
public class TestController {

    @Resource
    private RedisTemplate redisTemplate;

    @GetMapping("/t1")
    public RespResult test() {

        Object admin = redisTemplate.opsForValue().get("admin");
        System.out.println(admin);

        return RespResult.success(admin);
    }
}
